/**
 * @description: Get environment variables
 * @returns:
 * @example:
 */
export function getEnvValue<T = any>(key: string): T {
  // @ts-ignore
  return import.meta.env[key];
}

/**
 * @description: Get environment VITE_BASE_URL value
 * @returns:
 * @example:
 */
export function getBaseUrl(): string {
        return 'http://8.131.248.241:8089';
    //return 'http://localhost:8080';
    //   return 'https://himowang.com/pray-api';


    // const { miniProgram } = uni.getAccountInfoSync();
  // console.log('miniProgram.envVersion', miniProgram.envVersion);
  // switch (miniProgram.envVersion) {
  //   case 'develop':
  //     return getEnvValue<string>('VITE_BASE_URL');
  //   case 'trial':
  //     return getEnvValue<string>('VITE_BASE_URL_TRIAL');
  //   case 'release':
  //     return getEnvValue<string>('VITE_BASE_URL_RELEASE');
  //   default:
  //     console.error('miniProgram.envVersion error');
  //     return '';
  // }
}
